package na.learn.java.threads;

public class CallByRef {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		MyClass myClass = new MyClass();
		System.out.println(myClass.getName() + " " + myClass.getNumber());
		updateName(myClass, "null2");
		System.out.println(myClass.getName() + " " + myClass.getNumber());

	}

	public static void updateName(MyClass obj, String name) {
		obj.setName(name);
		obj.setNumber(new Integer(2));
	}

}
